<?php

namespace app\workerman\controller;

use Workerman\Worker;
use GatewayWorker\Register;
use think\Env;

class Sregister
{
    public function __construct()
    {
        $port = Env::get('workerman.registerAddress_port', 1238);
        new Register('text://0.0.0.0:'. $port  );
    
        if (!defined('GLOBAL_START')) {
            Worker::runAll();
        }
    }
}
